package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * @description: 审核状态（1-待审核，2-审核失败，3-审核成功）
 */
public enum BusinessRechargeApplyStateEnum {

    WAIT_AUDIT(1, "待审核"),
    AUDIT_FAIL(2, "审核失败"),
    AUDIT_SUCCESS(3, "审核成功"),
    ;

    @Getter
    private final Integer value;

    @Getter
    private final String name;

    BusinessRechargeApplyStateEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static BusinessRechargeApplyStateEnum typeOf(Integer value) {
        BusinessRechargeApplyStateEnum[] values = BusinessRechargeApplyStateEnum.values();
        for (BusinessRechargeApplyStateEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static BusinessRechargeApplyStateEnum typeOf(String name) {
        BusinessRechargeApplyStateEnum[] values = BusinessRechargeApplyStateEnum.values();
        for (BusinessRechargeApplyStateEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }
}
